package com.uum.admin.pojo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.util.List;

import com.uum.common.core.base.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class SysPermission extends BaseEntity {

    private static final long serialVersionUID=1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "权限名称")
    private String description;

    @ApiModelProperty(value = "请求路径权限标识")
    private String urlPerm;

    @ApiModelProperty(value = "按钮权限标识")
    private String btnPerm;

    @ApiModelProperty(value = "菜单名称")
    private Long menuId;

    @ApiModelProperty(value = "父Id")
    private Long parentId;

    @ApiModelProperty(value = "排序号")
    private Long orderNum;

    /**
     *  有权限的角色编号集合
     */
    @TableField(exist = false)
    private List<String> roles;

    @TableField(exist = false)
    private List<SysPermission> childrenList;

}
